home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Magazine / GraphicsCards / Warp3D / Developer / Include / clib / Warp3D_protos.h
Encoding:
C/C++ Source or Header  |  1999-02-04  |  7.2 KB  |  168 lines

  1. /*
  2. **
  3. ** Prototypes for Warp3D main library
  4. ** $VER: Warp3D_protos.h 1.0 (26.07.98)
  5. **
  6. **
  7. ** This file is part of the Warp3D Project.
  8. ** Warp3D is copyrighted
  9. ** (C) 1998 Sam Jordan, Hans-Jörg Frieden, Thomas Frieden
  10. ** All rights reserved
  11. **
  12. ** See the documentation for conditions.
  13. **
  14. */
  15.  
  16. #ifndef __CLIB_WARP3D_PROTOS_H
  17. #define __CLIB_WARP3D_PROTOS_H
  18.  
  19. #ifndef EXEC_TYPES_H
  20. #include <exex/types.h>
  21. #endif
  22. #ifndef __WARP3D_WARP3D_H
  23. #include <Warp3D/Warp3D.h>
  24. #endif
  25. #ifndef GRAPHICS_GFX_H
  26. #include <graphics/gfx.h>
  27. #endif
  28.  
  29. #if defined(__STORM__) && defined(__PPC__)
  30.  
  31. #ifndef STORMPROTOS_WARP3D_SPROTOS_H
  32. #include <stormprotos/warp3d_sprotos.h>
  33. #endif
  34.  
  35. #else
  36.  
  37.  
  38. #ifdef __cplusplus
  39. extern "C" {
  40. #endif
  41.  
  42.  
  43. /************************** Context functions ***********************************/
  44. W3D_Context    *W3D_CreateContext(ULONG *error, struct TagItem *CCTags);
  45. W3D_Context    *W3D_CreateContextTags(ULONG *error, Tag tag1, ...);
  46. void            W3D_DestroyContext(W3D_Context *context);
  47. ULONG           W3D_GetState(W3D_Context *context, ULONG state);
  48. ULONG           W3D_SetState(W3D_Context *context, ULONG state, ULONG action);
  49. ULONG           W3D_Hint(W3D_Context *context, ULONG mode, ULONG quality);
  50.  
  51. /************************** Hardware/Driver functions ***************************/
  52. ULONG           W3D_CheckDriver(void);
  53. ULONG           W3D_LockHardware(W3D_Context *context);
  54. void            W3D_UnLockHardware(W3D_Context *context);
  55. void            W3D_WaitIdle(W3D_Context *context);
  56. ULONG           W3D_CheckIdle(W3D_Context *context);
  57. ULONG           W3D_Query(W3D_Context *context, ULONG query, ULONG destfmt);
  58. ULONG           W3D_GetTexFmtInfo(W3D_Context *context, ULONG texfmt, ULONG destfmt);
  59. ULONG           W3D_GetDriverState(W3D_Context *context);
  60. ULONG           W3D_GetDestFmt(void);
  61. W3D_Driver **   W3D_GetDrivers(void);
  62. ULONG           W3D_QueryDriver(W3D_Driver* driver, ULONG query, ULONG destfmt);
  63. ULONG           W3D_GetDriverTexFmtInfo(W3D_Driver* driver, ULONG query, ULONG destfmt);
  64. ULONG           W3D_RequestMode(struct TagItem *taglist);
  65. ULONG           W3D_RequestModeTags(Tag tag1, ...);
  66. W3D_Driver *    W3D_TestMode(ULONG ModeID);
  67.  
  68. /************************** Texture functions ***********************************/
  69. W3D_Texture    *W3D_AllocTexObj(W3D_Context *context, ULONG *error,
  70.                                         struct TagItem *ATOTags);
  71. W3D_Texture    *W3D_AllocTexObjTags(W3D_Context *context, ULONG *error,
  72.                                         Tag tag1, ...);
  73. void            W3D_FreeTexObj(W3D_Context *context, W3D_Texture *texture);
  74. void            W3D_ReleaseTexture(W3D_Context *context, W3D_Texture *texture);
  75. void            W3D_FlushTextures(W3D_Context *context);
  76. ULONG           W3D_SetFilter(W3D_Context *context, W3D_Texture *texture,
  77.                                         ULONG MinFilter, ULONG MagFilter);
  78. ULONG           W3D_SetTexEnv(W3D_Context *context, W3D_Texture *texture,
  79.                                         ULONG envparam, W3D_Color *envcolor);
  80. ULONG           W3D_SetWrapMode(W3D_Context *context, W3D_Texture *texture,
  81.                                         ULONG mode_s, ULONG mode_t, W3D_Color *bordercolor);
  82. ULONG           W3D_UpdateTexImage(W3D_Context *context, W3D_Texture *texture,
  83.                                         void *teximage, int level, ULONG *palette);
  84. ULONG           W3D_UpdateTexSubImage(W3D_Context *context, W3D_Texture *texture, void *teximage,
  85.                     ULONG level, ULONG *palette, W3D_Scissor* scissor, ULONG srcbpr);
  86. ULONG           W3D_UploadTexture(W3D_Context *context, W3D_Texture *texture);
  87. ULONG           W3D_FreeAllTexObj(W3D_Context *context);
  88.  
  89. /************************** Drawing functions ***********************************/
  90. ULONG           W3D_DrawLine(W3D_Context *context, W3D_Line *line);
  91. ULONG           W3D_DrawPoint(W3D_Context *context, W3D_Point *point);
  92. ULONG           W3D_DrawTriangle(W3D_Context *context, W3D_Triangle *triangle);
  93. ULONG           W3D_DrawTriFan(W3D_Context *context, W3D_Triangles *triangles);
  94. ULONG           W3D_DrawTriStrip(W3D_Context *context, W3D_Triangles *triangles);
  95. ULONG           W3D_Flush(W3D_Context *context);
  96. ULONG           W3D_DrawLineStrip(W3D_Context *context, W3D_Lines *lines);
  97. ULONG           W3D_DrawLineLoop(W3D_Context *context, W3D_Lines *lines);
  98. /************************** Effect functions ************************************/
  99. ULONG           W3D_SetAlphaMode(W3D_Context *context, ULONG mode, W3D_Float *refval);
  100. ULONG           W3D_SetBlendMode(W3D_Context *context, ULONG srcfunc, ULONG dstfunc);
  101. ULONG           W3D_SetDrawRegion(W3D_Context *context, struct BitMap *bm,
  102.                                         int yoffset, W3D_Scissor *scissor);
  103. ULONG           W3D_SetDrawRegionWBM(W3D_Context *context, W3D_Bitmap *bm,
  104.                                         W3D_Scissor *scissor);
  105. ULONG           W3D_SetFogParams(W3D_Context *context, W3D_Fog *fogparams,
  106.                                         ULONG fogmode);
  107. ULONG           W3D_SetLogicOp(W3D_Context *context, ULONG operation);
  108. ULONG           W3D_SetColorMask(W3D_Context *context, W3D_Bool red, W3D_Bool green,
  109.                                         W3D_Bool blue, W3D_Bool alpha);
  110. ULONG           W3D_SetPenMask(W3D_Context *context, ULONG pen);
  111. ULONG           W3D_SetCurrentColor(W3D_Context *context, W3D_Color *color);
  112. ULONG           W3D_SetCurrentPen(W3D_Context *context, ULONG pen);
  113. void            W3D_SetScissor(W3D_Context *context, W3D_Scissor *scissor);
  114. void            W3D_FlushFrame(W3D_Context *context);
  115.  
  116. /************************** ZBuffer functions ***********************************/
  117. ULONG           W3D_AllocZBuffer(W3D_Context *context);
  118. ULONG           W3D_FreeZBuffer(W3D_Context *context);
  119. ULONG           W3D_ClearZBuffer(W3D_Context *context, W3D_Double *clearvalue);
  120. ULONG           W3D_ReadZPixel(W3D_Context *context, ULONG x, ULONG y,
  121.                                         W3D_Double *z);
  122. ULONG           W3D_ReadZSpan(W3D_Context *context, ULONG x, ULONG y,
  123.                                         ULONG n, W3D_Double z[]);
  124. ULONG           W3D_SetZCompareMode(W3D_Context *context, ULONG mode);
  125. void            W3D_WriteZPixel(W3D_Context *context, ULONG x, ULONG y,
  126.                                         W3D_Double *z);
  127. void            W3D_WriteZSpan(W3D_Context *context, ULONG x, ULONG y,
  128.                                         ULONG n, W3D_Double z[], UBYTE mask[]);
  129.  
  130. /************************** StencilBuffer functions *****************************/
  131. ULONG           W3D_AllocStencilBuffer(W3D_Context *context);
  132. ULONG           W3D_ClearStencilBuffer(W3D_Context *context, ULONG *clearvalue);
  133. ULONG           W3D_FillStencilBuffer(W3D_Context *context, ULONG x, ULONG y,
  134.                                         ULONG width, ULONG height, ULONG depth,
  135.                                         void *data);
  136. ULONG           W3D_FreeStencilBuffer(W3D_Context *context);
  137. ULONG           W3D_ReadStencilPixel(W3D_Context *context, ULONG x, ULONG y,
  138.                                         ULONG *st);
  139. ULONG           W3D_ReadStencilSpan(W3D_Context *context, ULONG x, ULONG y,
  140.                                         ULONG n, ULONG st[]);
  141. ULONG           W3D_SetStencilFunc(W3D_Context *context, ULONG func, ULONG refvalue,
  142.                                         ULONG mask);
  143. ULONG           W3D_SetStencilOp(W3D_Context *context, ULONG sfail, ULONG dpfail,
  144.                                         ULONG dppass);
  145. ULONG           W3D_SetWriteMask(W3D_Context *context, ULONG mask);
  146. ULONG           W3D_WriteStencilPixel(W3D_Context *context, ULONG x, ULONG y, ULONG st);
  147. ULONG           W3D_WriteStencilSpan(W3D_Context *context, ULONG x, ULONG y, ULONG n,
  148.                                         ULONG st[], UBYTE mask[]);
  149.  
  150. #ifdef __cplusplus
  151. };
  152. #endif
  153.  
  154.  
  155. #ifndef __PPC__
  156. #ifdef STORMPRAGMAS
  157. #ifndef _INCLUDE_PRAGMA_WARP3D_LIB_H
  158. #include <pragma/Warp3D_lib.h>
  159. #endif
  160. #endif
  161. #endif
  162.  
  163. #endif /* __STORM__ && __PPC__ */
  164.  
  165. #endif
  166.  
  167.  
  168.